{{template "layout/head.html" .}}

<div class="container" style="margin-top: 20px;">
    <div class="row">
        <div class="col-md-12">

            <div style="margin: 0 auto;">

                <ol class="breadcrumb">
                    <li><a href="/">首页</a></li>
                </ol>

                <div class="form-inline mb20" role="form">
                    <form action="/user/" method="get">
                        <div class="form-group">
                            <div class="form-group">
                                <input type="text" value="{{.Query}}" class="form-control" name="query"
                                       placeholder="username">
                            </div>
                            <button type="submit" class="btn btn-default">
                                <span class="glyphicon glyphicon-search"></span>
                                查找
                            </button>
                        </div>
                    </form>
                </div>
                <div class="form-search mb20">
                    <a class="btn btn-info" href="/user/new" role="button">新建</a>
                </div>
                <div class="us">
                    <table class="table table-striped">
                        <tr>
                            <th><input type="checkbox"></th>
                            <th>用户名</th>
                            <th>创建时间</th>
                            <th>更新时间</th>
                            <th>操作</th>
                        </tr>
                        {{range .Users}}
                            <tr>
                                <td><input type="checkbox" value="{{.Id}}"></td>
                                <td>{{.Username}}</td>
                                <td>{{.CreateDate}}</td>
                                <td>{{.UpdateDate}}</td>
                                <td>
                                    <a href="/user/{{.Id}}">查看</a>
                                    <a href="/user/edit/{{.Id}}">编辑</a>
                                    <a href="/user/delete/{{.Id}}">删除</a>
                                </td>
                            </tr>
                        {{end}}
                    </table>

                </div>

                {{template "layout/paginator.html" .}}

            </div>

        </div>
    </div>
</div>

{{template "layout/foot.html" .}}
